package com.lzx.adx.report.enums;

public enum XhsCovertXmEventTypeEnums {

    ACTIVATE_APP("APP_ACTIVE","ACTIVATE_APP","激活"),
//    RETENTION("APP_RETENTION","RETENTION","次留",""),
//    LAUNCH("APP_RE_ACTIVE","LAUNCH","应用唤起",""),
    REGISTER("APP_ACTIVE","REGISTER","注册");
    ;



    /**
     * 广点通code
     */
    private String code;

    /**
     * elm
     */
    private String elmCode;

    private String msg;




    public void setElmCode(String elmCode) {
        this.elmCode = elmCode;
    }

    public String getElmCode() {
        return elmCode;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    /**
     * 根据饿了么code ,找到广点通code
     * @param elmCode
     * @return
     */
    public static XhsCovertXmEventTypeEnums getQqyCode(String elmCode){
        for (XhsCovertXmEventTypeEnums value : XhsCovertXmEventTypeEnums.values()) {
            if(value.getElmCode().equals(elmCode)){
                return value;
            }
        }
        return  null;
    }


    XhsCovertXmEventTypeEnums(String code, String elmCode, String msg) {
        this.elmCode = elmCode;
        this.code = code;
        this.msg = msg;
    }
}
